- 
        Couldn't load subscription status. 
- Fork 7.7k
feat(esptool): Upgrade to esptool v5 #11433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(esptool): Upgrade to esptool v5 #11433
Conversation
| 
 👋 Hello lucasssvaz, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
 Review and merge process you can expect ...
 | 
| Test Results 76 files   76 suites   12m 45s ⏱️ Results for commit 2418fdd. ♻️ This comment has been updated with latest results. | 
50b52a6    to
    e1f4ba0      
    Compare
  
    e1f4ba0    to
    cd21551      
    Compare
  
            
          
                .github/scripts/package_esptool.sh
              
                Outdated
          
        
      | # Check version argument | ||
| if [[ $# -ne 3 ]]; then | ||
| echo "Usage: $0 <version> <base_folder> <json_path>" | ||
| echo "Example: $0 5.0.dev1 /tmp/esptool /tmp/esptool-5.0.dev1.json" | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain the arguments a bit. It is not clear what each one is. Is base_folder the output? Where does json_path come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@me-no-dev I've reworked the script to be way more flexible and useful. PTAL if there is anything missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the ESP32 platform’s esptool_py tool to version 5.0.dev1, harmonizes command-line options to use hyphens, and enhances the binary merge step.
- Bump esptool_pyversion and update URLs, checksums, and sizes in the package index JSON
- Standardize flags in platform.txt(use hyphens, add--pad-to-size, renamemerge_bin→merge-bin)
- Add a helper script (update_esptool.py) to automate JSON updates for new esptool releases
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description | 
|---|---|
| platform.txt | Switched underscores to hyphens on esptool flags; replaced merge_binwithmerge-binand introduced--pad-to-size | 
| package/package_esp32_index.template.json | Updated esptool_pyversion to5.0.dev1; refreshed URLs, checksums, and sizes for each host | 
| .github/scripts/update_esptool.py | New script to repack esptool artifacts and update the JSON metadata | 
Comments suppressed due to low confidence (2)
.github/scripts/update_esptool.py:42
- [nitpick] Add a docstring explaining the purpose, parameters, and return value of this helper function to improve readability and maintenance.
def compute_sha256(filepath):
.github/scripts/update_esptool.py:1
- Consider adding unit or integration tests for this script (e.g., for JSON update logic and archive creation) to ensure future changes remain correct.
#!/usr/bin/env python3
This pull request includes updates to the ESP32 platform files, focusing on upgrading the
esptool_pytool version, improving argument consistency, and enhancing functionality for binary merging and flashing. The changes ensure compatibility with the latest tool version and refine command-line arguments for clarity and correctness.Version Upgrade and Compatibility Updates:
esptool_pyversion from4.9.dev3to5.0.dev1inpackage/package_esp32_index.template.json, including URLs, checksums, and file sizes for various system architectures.Command Argument Improvements:
_) with hyphens (-) for options like--flash_mode,--flash_freq, and--flash_sizeinplatform.txt.Binary Merging Enhancements:
merge_binwithmerge-binand introducing the--pad-to-sizeargument for better handling of flash size padding inplatform.txt.